package com.movie.beans;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;


@ToString
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SysUser implements Serializable {
    private Long userId;
    private String loginName;
    private String userName;
    private String email;
    private String userPhone;
    private Integer sex;
    private String avatar;
    private String password;
    private String salt;
    private Integer status;
    private String loginIp;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginDate;
    private Date pwdUpdateTime;
    private Date updateTime;

    public boolean isAdmin(){
        return this.userId==0L?true:false;
    }
}
